<?php 
define('PAGE_NEED_PRI','PRI_EDIT');
session_start();
include_once "main.php";
?>
<?php  include("admin.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> Bios 管理中心 </title>
<link href="../css/control.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #000000}
-->
</style>
</head>

<body>
<a name="top" id="top"></a>
<div id="all"><!--Wrap start //-->
<div id="main" class="clearfix"><!--main start //-->
<div id="top-1"><?php include_once('blog_top_btn.php');?>
</div>
<!--Content for  id "submenu" Goes Here //-->
<div id="submenu">
<?php include_once('admin_main_btn.php');?>
  </div>
 <!--Content for  id "contact" Goes Here //-->
 <div id="contact-admin">
   
	  
	  
	  
	  
	  
	  
	<?php
	
	$id=make_safe($_GET["id"]);
$action=make_safe($_GET["action"]);
	if ($action=="del"){
	
		if($id!=""){
		

		
			$sql="Delete from guanli  where id in (".$id.")";
			$result=mysql_query($sql);
			
			echo "<script>window.location.href='admin-acc-no-main.php';</script>";
		}
	}
?>
	

	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  <table width="600" border="0" cellpadding="0" cellspacing="1"  >
        
        <tr bgcolor="#9E6401" > 
          <td width="262" height="25" align="center"><span class="STYLE1">帳號</span></td>
          <td width="306" align="center"><span class="STYLE1">密碼</span></td>
          <td width="228" height="25" align="center"><span class="STYLE1">操作</span></td>
        </tr>
        <?php 
		 //where box1='0' and box2='0' and box3='0' and box4='0' and box5='0' and box6='0' and box7='0'
   if($page){
    $page_size=20;
$sql="select count(*) as total from guanli where box1='0' and box2='0' and box3='0' and box4='0'";
	$result=mysql_query($sql);
    $message_count=mysql_result($result,0,"total");
    $page_count=ceil($message_count/$page_size);	
    $offset=($page-1)*$page_size;			 
    $sql="select * from guanli where box1='0' and box2='0' and box3='0' and box4='0'  order by id  limit $offset, $page_size";			
	$result=mysql_query($sql);
	while ($row=mysql_fetch_object($result)){
	?>
        <tr bgcolor="#D0EFFF" > 
          <td width="262" height="22"><div align="center"><span class="STYLE1"><?php echo $row->username;?></span></div></td>
          <td align="center"><span class="STYLE1"><?php echo $row->password;?></span></td>
          <td align="center">
		  <a href="admin-acc-no-main_xiugai.php?id=<?php echo $row->id;?>" ><span class="STYLE1">修改</span></a> 
    | <a href="?action=del&id=<?php echo $row->id;?>"  onClick="return ConfirmDelBig();"><span class="STYLE1">刪除</span></a></td>
        </tr>
        
		
		
		
		<?php }}?>
		 
		 <tr>
            <td height="100%" colspan="17" bgcolor="#CCCCFF" scope="col">
              <div align="center" class="STYLE1">總共&nbsp;<?php echo $message_count;?> 條記錄&nbsp;&nbsp;頁次：
			  <?php 
			  $BigClassName=$_GET["BigClassName"];
			  $BigClassName=urlencode($BigClassName);
			  if($page!=1)
				   {
				     echo  "<a href=?page=1&BigClassName=".$BigClassName.">首頁</a>&nbsp;&nbsp;&nbsp;";
					 echo "<a href=?page=".($page-1)."&BigClassName=".$BigClassName.">上一頁</a>&nbsp;&nbsp;&nbsp;";
				   } echo $page;?> / <?php echo $page_count;?> 页&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
       <?php
	  		  
				  if($page<$page_count)
				   {
				        echo "<a href=?page=".($page+1)."&BigClassName=".$BigClassName.">下一頁</a>&nbsp;&nbsp;&nbsp;";
				        echo  "<a href=?page=".$page_count."&BigClassName=".$BigClassName.">尾頁</a>&nbsp;&nbsp;&nbsp;&nbsp;";
				   
				   }
				   
				?>
                 &nbsp;&nbsp;&nbsp;跳轉到
                 <script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
                 <select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('self',this,0)">
                 
                 <?php 
				 for($i=1;$i<=$page_count;$i++){
				 ?>
                   <option value="?page=<?php echo $i;?>" <?php if($page==$i){echo "selected";}?>><?php echo $i;?></option>
                   <?php }?>
              </select>頁			  </div>            </td>
        </tr>
    </table>
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
	  
   </div>
<div id="contact_page"></div>
</div><!-- main end //-->
</div><!--Wrap end //-->
<div id="botton">
 <?php include_once('admin_botton_btn.php');?>
</div>
</body>
</html>
